package com.wsx.ones.akka.service.impl;

import com.wsx.ones.akka.domian.Message;
import com.wsx.ones.akka.service.TestService;
import org.springframework.stereotype.Component;

/**
 * @author wangshuaixin
 * @Title: com.wsx.ones.akka.service.impl.TestServiceImpl
 * @Description: TODO
 * @date 2019/05/10
 */
@Component
public class TestServiceImpl implements TestService {


    @Override
    public Message test(Message m) {
        Message msg = new Message(m.getId(), m.getName());
        try {
            Thread.sleep(10);
            msg.result("test success");
        } catch (Exception e) {
            msg.result(e.getMessage());
        }
        return msg;
    }
}
